package firstPack;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.BasicGameState;
import org.newdawn.slick.state.StateBasedGame;

/**
 * Very simple state that allows the user to pause the play
 * game state.
 * State 2
 * @author El Jefe
 *
 */
public class PauseGameState extends BasicGameState{

	@Override
	public void init(GameContainer arg0, StateBasedGame arg1)
			throws SlickException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void render(GameContainer arg0, StateBasedGame arg1, Graphics disp)
			throws SlickException {
		disp.drawString("Paused", 200, 200);
		
	}

	@Override
	public void update(GameContainer container, StateBasedGame sbg, int arg2)
			throws SlickException {
		Input input = container.getInput();
		if(input.isKeyPressed(input.KEY_SPACE)){
			sbg.enterState(1);
		}
		
	}

	@Override
	public int getID() {
		// TODO Auto-generated method stub
		return 2;
	}
	
	

}
